package org.simtube.index;

public class CEntry {
	
	// fields
	
	private CEntryType type;
	private Region r;
	private CNode current;
	private CNode pn;
	private int index;
	
	// setters and getters
	
	public void setType(CEntryType type) {
		this.type = type;
	}
	public CEntryType getType() {
		return type;
	}
	public void setRegion(Region r) {
		this.r = r;
	}
	public Region getRegion() {
		return r;
	}
	public void setCNode(CNode pn) {
		this.pn = pn;
	}
	public CNode getCNode() {
		return pn;
	}
	public void setCurrentNode(CNode current) {
		this.current = current;
	}
	public CNode getCurrentNode() {
		return this.current;
	}
	public void setIndex(int index) {
		this.index = index;
	}
	public int getIndex() {
		return index;
	}
	
	// main methods
	
	public CEntry(Region r, int index) {
		this.setRegion(r);
		this.setIndex(index);
		this.setType(CEntryType.EData);
	}
	
	public CEntry(Region r, CNode pn) {
		this.setRegion(r);
		this.setCNode(pn);
		this.setType(CEntryType.EChild);
	}
}
